package com.example.factory_demo.factory.factorymethod;

import com.example.factory_demo.ICourse;

public class FactoryMethodTest {

    public static void main(String[] args) {
        //工厂方法模式的 测试用例
        ICourseFactory javaCourseFactory = new JavaCourseFactory();
        ICourse java = javaCourseFactory.createCourse();
        java.record();

        ICourseFactory factory = new PythonCourseFactory();
        ICourse iCourse = factory.createCourse();
        iCourse.record();
    }
}
